package com.gyl.query.base;

import java.util.Map;

import org.apache.commons.lang.StringUtils;

import com.gyl.query.BaseQuery;

public class DepartmentQuery extends BaseQuery {
	
	private String name ;
	private String description ;
	
	@Override
	public Map<String, Object> buildWhere() {
		if(StringUtils.isNotBlank(this.name) && !"".equals(this.name)) {
			this.getQueryMap().put("o.name", this.name) ;
		}
		if(StringUtils.isNotBlank(this.description) && !"".equals(this.description)) {
			this.getQueryMap().put("o.description", this.description) ;
		}
		return this.getQueryMap() ;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	

}
